mod utils;
mod entity;
mod controller;

use controller::user_info;

use actix_web::{middleware, App, HttpServer};

#[actix_rt::main]
async fn main() -> std::io::Result<()> {
    std::env::set_var("RUST_LOG", "actix_web=info");
    env_logger::init();

    HttpServer::new(|| App::new().wrap(middleware::Logger::default())
        .service(user_info::login)
        .service(user_info::save_user_info))
        .bind("127.0.0.1:8080")?
        .run()
        .await
}